<div class="maintop">
	当前位置：编辑商品分类
	<a href="javascript:;" action="<?=$basepath?>" class="mainFrame button">返回</a>
	<a href="javascript:;" action="<?=$basepath?>_edit?id=<?=$data['id']?>" class="mainFrame button">刷新</a>
</div>
<div class="main-search">
</div>
<div id="mainbody">
	<div class="main">
		<div class="info">
				<form name="category_edit_save" action="<?=$basepath?>_edit_save" method="POST" target="ajax" func="form_submit">
					<input type="hidden" name="id" value="<?=$data['id']?>" />
					<div style="display:none;" class="hiddencontentdiv"><textarea id="hiddencontent" name="hiddencontent"></textarea></div>
					<dl><dt>分类名称：</dt><dd><input type="text" name="title" class="wtxt" value="<?=$data['title']?>" /></dd></dl>
					<dl><dt>副标题：</dt><dd><input type="text" name="subtitle" class="wtxt" value="<?=$data['subtitle']?>" /></dd></dl>
					<dl><dt>上级分类：</dt><dd><select type="text" name="parentid">
						<option value="0" <?=(intval($data['parentid'])==0 ? ' selected="selected"' : '')?>>主分类</option>
						<?php
							if($parentcategory){
								foreach($parentcategory as $k=>$v){
									echo '<option value="',$v['id'],'"',(intval($data['parentid'])==intval($v['id']) ? ' selected="selected"' : ''),'>',$v['title'],'</option>';	
								}
							}
						?>
					</select></dd></dl>
					<dl><dt>分类图标：</dt><dd><input type="text" name="icon" id="icon" class="wtxt" value="#" /></dd><dd><input type="button" name="uploadbutton" id="uploadbutton" value="选择" /></dd></dl>
					<dl><dt>背景色：</dt><dd><input type="color" name="bgcolor" class="mint" value="<?=$data['bgcolor'] ?>" /></dd><dt>文字色：</dt><dd><input type="color" name="txtcolor" class="mint" value="<?=$data['txtcolor'] ?>" /></dd></dl>
					<dl><dt>链接地址：</dt><dd><input type="text" name="url" class="wtxt" value="<?=$data['url'] ?>" /></dd><dd class="t">不为空时，系统将直接链接到此址</dd></dl>
					<dl><dt>分类排序：</dt><dd><input type="text" name="sort" class="mint" value="<?=$data['sort'] ?>" /></dd><dd class="t">按0,1,2,3的顺序排序</dd></dl>
					<dl><dt>分类状态：</dt><dd><select name="state">
						<option value="0"<?=(intval($data['state'])==0 ? ' selected="selected"' : '')?>>禁用</option>
						<option value="1"<?=(intval($data['state'])==1 ? ' selected="selected"' : '')?>>启用</option>
					</select></dd></dl>
					<dl><dt>&nbsp;</dt><dd>
							<input type="submit" value="确认" class="btnbig" />
							<a href="javascript:;" action="<?=$basepath?>" class="mainFrame btnbig">返回</a>
					</dd></dl>
				</form>
		</div>
	</div>
</div>
<? $this->display('editor',array('textareaid'=>'hiddencontent','uploadbutton'=>'uploadbutton','inputid'=>'icon')); ?>
